<?php
class User_model extends CI_Model {
	public function __construct() {
		parent :: __construct();
	}

	public function count_nums(){ /*取得总行数*/
		return $this->db->count_all('user');
	}

	public function list_users($limit,$offset = 0){ /*获取分页customer数据*/
		$this->db->limit($limit,$offset);
		$this->db->order_by("create_time", "desc");
		$query=$this->db->get('user');
		if ($query->num_rows() > 0){
			return $query->result();
		}else{
			return $query->result();
		}
	}
}
?>